package com.java2007.hotel.service;

import com.java2007.hotel.pojo.DetailOrder;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

/**
 * 订单详情业务接口
 * @author csl
 * @version V1.0
 * @date 2021/01/23
 **/
public interface DetailOrderService {

    /**
     * 根据订单编号查询
     * @param orderNumber
     * @return
     */
    List<DetailOrder> selectDetailOrderByOrder(String orderNumber) throws SQLException;


    /**
     * 菜单详情中增加一个信息
     * @param detailOrder
     * @return
     */
    int addDetailOrder(DetailOrder detailOrder,int createrId) throws SQLException;

    /**
     * 修改菜单详情中数量
     * @param foodCount
     * @return
     */
    int updateFoodCount(Date update, int foodCount, Long foodTotalPrice, int id) throws SQLException;


    /**
     * 查询某用户为下单的菜单详情
     * @param Id
     * @return
     */

    List<DetailOrder> selectDetailOrderByUserIdAndUnOrder(int Id) throws SQLException;

    /**
     * 根据id查询菜单详情
     * @param id
     * @return
     */
    DetailOrder selectById(int id) throws SQLException;

    /**
     * 根据id删除订单详情
     * @param id
     * @return
     */
    int deleteDetailOrderById( int id) throws SQLException;

    /**
     * 根据创建人添加菜单详情的订单编号
     * @param createrId
     * @return
     */
    int updateOrderNumber(int createrId,String numer) throws SQLException;


    /**
     * 根据订单编号查询菜单详情
     * @param foodNumber
     * @return
     */
    List<DetailOrder> selectByFoodNumber(String foodNumber) throws SQLException;


    /**
     * 根据编号删除订单详情
     * @param number
     * @return
     */
    int deleteDetailOrderByNumber( String number) throws SQLException;
}
